#pragma once

class Stream;
class BinaryReader;
struct GameScore
{
	UInt8	_id;
	UInt32	_totalWinCount;
	UInt32	_totalFailCount;
	UInt32	_totalBetCoin;
	UInt32	_totalWinCoin;
	UInt32	_maxWinCoin;
	UInt32	_winCount;
	UInt32	_failCount;
	UInt32	_betCoin;
	UInt32	_winCoin;
	UInt32	_todayMaxWinCoin;
	UInt32	_specialWinCount;
	UInt32	_totalSpecialWinCount;
	UInt32	_thisDay;

	GameScore()
	{
		memset( this, 0x00, sizeof(GameScore) );
	}

	void appendData( Stream& st )
	{
		st << _id << _totalWinCount << _totalFailCount << _totalBetCoin << _totalWinCoin << _maxWinCoin << _winCount;
		st << _failCount << _betCoin << _winCoin << _todayMaxWinCoin << _specialWinCount << _totalSpecialWinCount << _thisDay;
	}

	void buildData( BinaryReader& br )
	{
		br >> _id >> _totalWinCount >> _totalFailCount >> _totalBetCoin >> _totalWinCoin >> _maxWinCoin >> _winCount;
		br >> _failCount >> _betCoin >> _winCoin >> _todayMaxWinCoin >> _specialWinCount >> _totalSpecialWinCount >> _thisDay;
	}
};